
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        .form-radio,
        .form-checkbox {
            color: #5a5e66;
            font-weight: 500;
            line-height: 1;
            position: relative;
            cursor: pointer;
            display: inline-block;
            white-space: nowrap;
            outline: none;
            font-size: 14px;
            -moz-user-select: none;
            -webkit-user-select: none;
            -ms-user-select: none;
            margin-right: 8px;
        }

        .form-radio::after,
        .form-checkbox::after {
            display: block;
            height: 0;
            content: "";
            clear: both;
        }

        .form-radio>span,
        .form-radio>input,
        .form-checkbox>span,
        .form-checkbox>span {
            float: left;
        }

        .form-radio>input,
        .form-checkbox>input {
            display: none;
        }

        .form-radio>.label,
        .form-checkbox>.label {
            padding-left: 5px;
            line-height: 20px;
        }

        .form-radio>.inner,
        .form-checkbox>.inner {
            border: 1px solid #d8dce5;
            width: 14px;
            height: 14px;
            background-color: #fff;
            position: relative;
            cursor: pointer;
            display: inline-block;
            box-sizing: border-box;
        }

        .form-radio>.inner {
            border-radius: 100%;
        }

        .form-checkbox>.inner {
            border-radius: 2px;
        }

        .form-radio>.inner:after {
            width: 6px;
            height: 6px;
            border-radius: 100%;
            background: #409eff;
            content: "";
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%) scale(0);
            transition: transform .15s ease;
        }

        .form-radio:hover>.inner,
        .form-radio>input:checked+.inner {
            border-color: #409eff;
        }

        .form-radio>input:checked+.inner+.label,
        .form-checkbox>input:checked+.inner+.label {
            color: #409eff;
            line-height: 20px;
        }

        .form-radio>input:disabled+.inner+.label,
        .form-checkbox>input:disabled+.inner+.label {
            color: #b4bccc;
        }

        .form-radio>input:checked+.inner:after {
            transform: translate(-50%, -50%) scale(1);
        }

        .form-checkbox>.inner:after {
            display: block;
            box-sizing: border-box;
            width: 3px;
            height: 7px;
            border: 1px solid #fff;
            border-left: none;
            border-top: none;
            content: "";
            position: absolute;
            left: 50%;
            top: 45%;
            transform-origin: center center;
            transform: translate(-50%, -50%) rotate(36deg) scale(0);
            transition: all .2s ease;
        }

        .form-checkbox:hover>.inner {
            border-color: #409eff;
        }

        .form-checkbox>input:checked+.inner {
            border-color: #409eff;
            background: #409eff;
        }

        .form-checkbox>input:disabled+.inner,
        .form-radio>input:disabled+.inner {
            cursor: not-allowed;
            border-color: #b4bccc;
        }

        .form-checkbox>input:disabled+.inner+.label,
        .form-radio>input:disabled+.inner+.label {
            cursor: not-allowed;
            color: #b4bccc;
        }

        .form-radio>input:disabled+.inner:after {
            background-color: #b4bccc;
        }

        .form-checkbox>input:checked:disabled+.inner {
            background: #b4bccc;
        }

        .form-checkbox>input:checked+.inner:after {
            transform: translate(-50%, -50%) rotate(36deg) scale(1);
        }
    </style>
</head>

<body>
<label class="form-radio">
    <input type="radio" name="单选">
    <span class="inner"></span>
    <label class="label">选项1</label>
</label>
<label class="form-radio">
    <input type="radio" name="单选">
    <span class="inner"></span>
    <label class="label">选项2</label>
</label>
<label class="form-radio">
    <input type="radio" name="单选2" disabled checked>
    <span class="inner"></span>
    <label class="label">选项3</label>
</label>
<label class="form-radio">
    <input type="radio" name="单选2" disabled>
    <span class="inner"></span>
    <label class="label">选项4</label>
</label>

<br>
<br>
<label class="form-checkbox">
    <input type="checkbox">
    <span class="inner"></span>
    <span class="label">选项2</span>
</label>
<label class="form-checkbox">
    <input type="checkbox">
    <span class="inner"></span>
    <span class="label">选项3</span>
</label>

<label class="form-checkbox">
    <input type="checkbox" disabled checked>
    <span class="inner"></span>
    <span class="label">禁用选项1</span>
</label>
<label class="form-checkbox">
    <input type="checkbox" disabled>
    <span class="inner"></span>
    <span class="label">禁用选项2</span>
</label>

</body>

</html>
